<?php use_helper('I18N'); ?>

<div id="content">

    <!-- ========== CATEGORIES TABS ========= -->
    <!-- ==================================== -->
    <table id="contentMainWrapper" border="0" cellpadding="0" cellspacing="0" width="100%">
        <tbody>
        <tr>
            <td id="column-left" style="width: 215px;">
                <div style="width:215px;">
                    <!--// bof: categories //-->
                    <div class="box" id="categories" style="width:215px;">
                        <div class="box-border">
                            <div class="box-head">
                                <?php echo __('Categories') ?>
                            </div>
                            <div class="box-body">
                                <?php include_component('component', 'categoriesSideMenu') ?>
                            </div>
                        </div>
                    </div>
                    <!--// eof: categories //-->
                    <!--// bof: specials //-->
                    <div class="box" id="specials" style="width:215px;">
                        <div class="box-border">
                            <div class="box-head">
                                <a href="<?php echo url_for("/product/specialItem") ?>"><?php echo __('Specials') ?></a>
                            </div>
                            <div class="box-body">
                                <?php include_component('component', 'specialsSideMenu', array('param' => 'will implement for categoryType')) ?>
                            </div>

                        </div>
                    </div>
                    <!--// eof: specials //-->
                </div>
            </td>
            <td id="column-center" valign="top">
                <div class="column-center-padding">

                    <div class="centerColumn" id="createAcctSuccess">
                        <h1 id="createAcctSuccessHeading">Your Account Has Been Created!</h1>

                        <div id="createAcctSuccessMainContent" class="content">Congratulations! Your new account has
                            been successfully created! You can now take advantage of member privileges to enhance your
                            online shopping experience with us. If you have
                            <small><strong>ANY</strong></small>
                            questions about the operation of this online shop, please email the <a
                                    href="<?php echo url_for("/contactUs") ?>">store owner</a>.
                            <br><br>
                            A confirmation has been sent to the provided email address. If you have not received it
                            within the hour, please <a href="<?php echo url_for("/contactUs") ?>">contact us</a>.
                        </div>
                        <fieldset>
                            <legend>Primary Address</legend>
                            <?php
                            foreach ($cmsMemberAddresses as $cmsMemberAddress) {
                            $addressId = $cmsMemberAddress->getAddressId();
                            ?>
                            <h3 class="addressBookDefaultName"><?php echo $cmsMemberAddress->getAddress1() ?></h3>

                            <address>
                                <?php $address = $cmsMemberAddress->getAddress1();

                                if ($cmsMemberAddress->getAddress2() != null && $cmsMemberAddress->getAddress2() != "")
                                    $address .= "<br>" . $cmsMemberAddress->getAddress2();

                                $address2 = "";
                                if ($cmsMemberAddress->getPostcode() != null && $cmsMemberAddress->getPostcode() != "")
                                    $address2 = $cmsMemberAddress->getPostcode();

                                if ($cmsMemberAddress->getCity() != null && $cmsMemberAddress->getCity() != "") {
                                    if ($address2 != "")
                                        $address2 .= " ";
                                    $address2 .= $cmsMemberAddress->getCity();
                                }
                                if ($cmsMemberAddress->getState() != null && $cmsMemberAddress->getState() != "") {
                                    if ($address2 != "")
                                        $address2 .= "<br>";
                                    $address2 .= $cmsMemberAddress->getState();
                                }
                                if ($cmsMemberAddress->getCountry() != null && $cmsMemberAddress->getCountry() != "") {
                                    if ($address2 != "")
                                        $address2 .= " ";
                                    $address2 .= $cmsMemberAddress->getCountry();
                                }

                                echo $address."<br>".$address2;
                                ?>
                            </address>

                            <div class="buttonRow forward">
                                <a href="<?php echo url_for("/member/editAddress?id=" . $addressId) ?>"
                                   style="text-decoration: none">
                                    <img title="Edit" alt="Edit"
                                         src="/images/buttons/arrow-right.png">&nbsp;<strong><?php echo __('Edit') ?></strong>
                                </a>
                                <a href="<?php echo url_for("/member/deleteAddress?id=" . $addressId) ?>"
                                   style="text-decoration: none">
                                    <img title="Delete" alt="Delete"
                                         src="/images/buttons/arrow-right.png">&nbsp;<strong><?php echo __('Delete') ?></strong>
                                </a>
                            </div>
                            <br class="clearBoth">
                            <?php } ?>
                        </fieldset>


                        <div class="buttonRow forward">
                            <a href="<?php echo url_for("/home") ?>" style="text-decoration: none">
                                <img title="Continue" alt="Continue"
                                     src="/images/buttons/arrow-right.png">&nbsp;<strong><?php echo __('Continue') ?></strong>
                            </a>
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
            </td>
        </tr>
        </tbody>
    </table>
</div>